package com.mars.admin.modules.post.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mars.admin.framework.listener.EntityChangeListener;
import com.mybatisflex.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 帖子评论点赞实体类
 *
 * @author Mars
 * @version 1.0
 * @date 2025-01-07
 */
@Data
@Accessors(chain = true)
@Table(value = "tb_post_comment_like", onInsert = EntityChangeListener.class)
@Schema(description = "帖子评论点赞")
public class PostCommentLike {

    private static final long serialVersionUID = 1L;

    /**
     * 点赞ID
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "点赞ID", example = "1")
    private Long id;

    /**
     * 评论ID
     */
    @Schema(description = "评论ID", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    @Column("comment_id")
    private Long commentId;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    @Column("user_id")
    private Long userId;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间", example = "2024-01-01 12:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(value = "create_time", onInsertValue = "now()")
    private LocalDateTime createTime;
} 